import type{App} from 'vue'
import {useUserInfoStore} from'@/stores/userInfo'
function hasBtnPermission(app:App){
    app.directive('has',{
        mounted(el,bindings){
            if (!useUserInfoStore().userInfo.buttons.includes(bindings.value)) {
                el.parentNode.removeChild(el)
            } 
        }       
      })
}

export default hasBtnPermission